{% extends 'admin_base.html' %}
{% load i18n %}

{% block content %}
<div class="col-12">
  <div class="card">
    <div class="table-responsive">
      <table
          class="table table-vcenter table-nowrap">
        <thead>
          <tr>
            <th>{% translate "Name" %}</th>
            <th>{% translate "Tags" %}</th>
            <th></th>
          </tr>
        </thead>
        <tbody>
          {% for template in object_list %}
          <tr>
            <td>{{ template.name }}</td>
            <td>{% for tag in template.tags %}<span class="badge bg-blue-lt text-blue-lt-fg" style="margin-right: 10px">{{ tag }}</span>{% endfor %}</td>
            <td class="text-end">
              <a href="{{ template.update_url }}" class="btn btn-white">
                {% translate "View" %}
              </a>
            </td>
          </tr>
          {% empty %}
          <tr>
            <td colspan="3">{% trans "No items available" %}</td>
          </tr>
          {% endfor %}
        </tbody>
      </table>
      {% include "_paginator.html" %}
    </div>
  </div>
</div>
{% endblock %}
